﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="YinHangJK.aspx.cs" Inherits="Web.Pages.QuShui.DiXiaS.ShouFeiGL.YinHangJK" Theme="Default"%>

<%@ Register Assembly="DevExpress.Web.v15.2, Version=15.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web" TagPrefix="dx" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <script src="../../../../JS/jquery.js" type="text/javascript"></script>
    <script src="../../../../JS/AddEditCancel.js" type="text/javascript"></script>
    <script type="text/javascript">
        function Search() {
            //alert(1);
            gvGridTab1.PerformCallback();
        }


        function Uploader_OnFileUploadComplete(e) {
            if (e.callbackData != "") {
                var vals = e.callbackData.split(",");
                if (vals[2] == "0") {
                    alert("该文件已经导入，不能重复导入");
                } else if (vals[2] == "1") {
                    alert(vals[0] + "上传成功！");
                    gvGridTab3.PerformCallback();
                }
            }
        }
    </script>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<div class="tabletitle1" align="center">
    银行接口
</div>
<%-- <div style="display: none;">
            <dx:ASPxHiddenField ID="hdCollection" ClientInstanceName="hdCollection" runat="server"></dx:ASPxHiddenField>
            <dx:ASPxCallback ID="ASPxCallback1" ClientInstanceName="ASPxCallback1" runat="server" OnCallback="ASPxCallback1_Callback" ClientSideEvents-CallbackComplete="function(s,e){ASPxCallback1Complete(e.result);}"></dx:ASPxCallback>
        </div>--%>
<asp:UpdatePanel ID="updatePanel1" runat="server">
<ContentTemplate>
<div>
    <dx:ASPxPageControl ID="ASPxPageControl1" runat="server" ActiveTabIndex="1" Width="98%" AutoPostBack="false">
        <TabPages>
            <dx:TabPage Text="银行合同库维护">
                <ContentCollection>
                    <dx:ContentControl>
                        <div>
                            <div>
                                <table>
                                    <tr>
                                        <td style="width: 80PX;">
                                            <span style="font-size: 12px;">水量年月：</span>
                                        </td>
                                        <td style="float: left; width: 120PX;">
                                            <dx:ASPxTextBox runat="server" ID="txtShuiLiangYM" Width="45%" ClientInstanceName="txtShuiLiangYM">
                                                <ClientSideEvents KeyUp="function(s,e){inputNum(s);}" KeyPress="function(s,e){var key = event.keyCode;if( key==13){Search();}}"/>
                                            </dx:ASPxTextBox>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                            <dx:ASPxGridView ID="gvGridTab1" ClientInstanceName="gvGridTab1" runat="server" AutoGenerateColumns="False" KeyFieldName="ID"
                                             ClientIDMode="AutoID" Settings-ShowVerticalScrollBar="true" Width="100%" EnableCallBacks="true" OnCustomCallback="gvGridTab1_CustomCallback">
                                <Columns>
                                    <dx:GridViewDataTextColumn FieldName="S_YONGHUH" Caption="用户号" Width="10%">
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataTextColumn FieldName="S_ZHANGHAO" Caption="帐号" Width="20%">
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataTextColumn FieldName="S_HUMING" Caption="户名" Width="25%">
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataTextColumn FieldName="S_KAIHUH" Caption="开户行" Width="20%">
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataTextColumn FieldName="S_HETONGH" Caption="合同号" Width="25%">
                                    </dx:GridViewDataTextColumn>
                                </Columns>
                                <Settings VerticalScrollBarMode="Visible" HorizontalScrollBarMode="Auto" VerticalScrollableHeight="500"/>
                                <SettingsPager Mode="EndlessPaging" PageSize="100"/>
                                <Settings ShowFooter="True"/>
                                <SettingsBehavior AllowFocusedRow="True"/>
                                <SettingsBehavior ProcessFocusedRowChangedOnServer="false"/>
                                <%--<ClientSideEvents Init="function(s,e){AdjustSize(300,gvGridTab1);}" />--%>
                            </dx:ASPxGridView>
                        </div>
                        <br/>
                        <hr/>
                        <div>
                            <table style="text-align: right; width: 100%;">
                                <tr>
                                    <td style="float: right">
                                        <dx:ASPxButton runat="server" ID="btnExportExcelTab1" Text="导出Excel">
                                        </dx:ASPxButton>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </dx:ContentControl>
                </ContentCollection>
            </dx:TabPage>
            <dx:TabPage Text="导出银行文件">
                <ContentCollection>
                    <dx:ContentControl>
                        <div>
                            <table>
                                <tr>
                                    <dx:ASPxButton runat="server" ID="btnShengChengWJ" Text="生成文件" OnClick="btnShengChengWJ_Click">
                                    </dx:ASPxButton>
                                    <dx:ASPxButton runat="server" ID="btnQuXiaoWJ" Text="取消文件" OnClick="btnQuXiaoWJ_Click">
                                    </dx:ASPxButton>
                                </tr>
                            </table>
                        </div>
                        <div>
                            <div style="float: left; width: 48%">
                                <dx:ASPxGridView ID="gvGrid1Tab2" ClientInstanceName="gvGrid1Tab2" runat="server" AutoGenerateColumns="False" KeyFieldName="ID"
                                                 Settings-ShowVerticalScrollBar="true" Width="100%">
                                    <Columns>
                                        <dx:GridViewDataTextColumn FieldName="S_WENJIANM" Caption="文件名" Width="30%">
                                        </dx:GridViewDataTextColumn>
                                        <dx:GridViewDataTextColumn FieldName="N_ZONGJINE" Caption="总金额" Width="20%" PropertiesTextEdit-DisplayFormatString="0.00">
                                        </dx:GridViewDataTextColumn>
                                        <dx:GridViewDataTextColumn FieldName="I_ZONGBIS" Caption="总笔数" Width="20%">
                                        </dx:GridViewDataTextColumn>
                                        <dx:GridViewDataTextColumn FieldName="I_SHOUFEILX" Caption="收费类型" Width="30%">
                                            <DataItemTemplate>
                                                <%#Eval("I_SHOUFEILX").ToString() == "1" ? "旧欠托收" : "本月托收" %>
                                            </DataItemTemplate>
                                        </dx:GridViewDataTextColumn>
                                    </Columns>
                                    <Settings VerticalScrollBarMode="Visible" HorizontalScrollBarMode="Auto" VerticalScrollableHeight="500"/>
                                    <SettingsPager Mode="EndlessPaging" PageSize="100"/>
                                    <Settings ShowFooter="True"/>
                                    <SettingsBehavior AllowFocusedRow="True"/>
                                    <SettingsBehavior ProcessFocusedRowChangedOnServer="false"/>
                                </dx:ASPxGridView>
                            </div>
                            <div style="float: right; width: 48%">
                                <dx:ASPxGridView ID="gvGrid2Tab2" ClientInstanceName="gvGrid2Tab2" runat="server" AutoGenerateColumns="False" KeyFieldName="ID"
                                                 ClientIDMode="AutoID" Settings-ShowVerticalScrollBar="true" Width="100%" EnableCallBacks="true">
                                    <Columns>
                                        <dx:GridViewDataTextColumn FieldName="S_WENJIANM" Caption="文件名" Width="25%">
                                        </dx:GridViewDataTextColumn>
                                        <dx:GridViewDataTextColumn FieldName="N_ZONGJINE" Caption="总金额" Width="25%" PropertiesTextEdit-DisplayFormatString="0.00">
                                        </dx:GridViewDataTextColumn>
                                        <dx:GridViewDataTextColumn FieldName="I_ZONGBIS" Caption="总笔数" Width="25%">
                                        </dx:GridViewDataTextColumn>
                                        <dx:GridViewDataTextColumn FieldName="D_SHANGCHUANRQ" Caption="上传日期" Width="25%" PropertiesTextEdit-DisplayFormatString="yyyy-MM-dd">
                                        </dx:GridViewDataTextColumn>
                                    </Columns>
                                    <Settings VerticalScrollBarMode="Visible" HorizontalScrollBarMode="Auto" VerticalScrollableHeight="500"/>
                                    <SettingsPager Mode="EndlessPaging" PageSize="100"/>
                                    <Settings ShowFooter="True"/>
                                    <SettingsBehavior AllowFocusedRow="True"/>
                                    <SettingsBehavior ProcessFocusedRowChangedOnServer="false"/>
                                </dx:ASPxGridView>
                            </div>
                        </div>
                    </dx:ContentControl>
                </ContentCollection>
            </dx:TabPage>
            <dx:TabPage Text="导入银行文件">
                <ContentCollection>
                    <dx:ContentControl>
                        <div>
                            <div>
                                <table>
                                    <tr>
                                        <td style="vertical-align: top;">
                                            <dx:ASPxUploadControl ID="UpLoadFile" runat="server" ClientInstanceName="uploader"
                                                                  ShowTextBox="false" Theme="Aqua" UploadMode="Standard" ShowClearFileSelectionButton="False"
                                                                  ShowProgressPanel="True" NullText="" OnFileUploadComplete="UpLoadFile_FileUploadComplete"
                                                                  Width="0px">
                                                <BrowseButton Text="导入文件"></BrowseButton>
                                                <ClientSideEvents FileUploadComplete="function(s, e) { Uploader_OnFileUploadComplete(e); }"
                                                                  TextChanged="function(s, e) { uploader.Upload();}">
                                                </ClientSideEvents>
                                                <ValidationSettings MaxFileSize="4194304" AllowedFileExtensions=".txt" NotAllowedFileExtensionErrorText="只能上传txt文件">
                                                </ValidationSettings>
                                            </dx:ASPxUploadControl>
                                        </td>
                                        <%--  <td>
                                                             <dx:ASPxUploadControl ID="UpLoadFile" runat="server" ClientInstanceName="uploader"
                                                            ShowTextBox="false" Theme="Aqua" UploadMode="Standard" ShowClearFileSelectionButton="False"
                                                            ShowProgressPanel="false" NullText="" OnFileUploadComplete="UpLoadFile_FileUploadComplete"
                                                            Width="0px">
                                                            <BrowseButton Text="导入文件"></BrowseButton>
                                                            <ClientSideEvents FileUploadComplete="function(s, e) { Uploader_OnFileUploadComplete(e); }"
                                                                TextChanged="function(s, e) { uploader.Upload();}"></ClientSideEvents>
                                                            <ValidationSettings MaxFileSize="4194304" AllowedFileExtensions=".txt"  NotAllowedFileExtensionErrorText="只能上传txt文件">
                                                            </ValidationSettings>
                                                        </dx:ASPxUploadControl> 
                                                        </td>--%>
                                    </tr>
                                </table>
                            </div>
                            <dx:ASPxGridView ID="gvGridTab3" ClientInstanceName="gvGridTab3" runat="server" AutoGenerateColumns="False" KeyFieldName="S_BIANHAO"
                                             ClientIDMode="AutoID" Settings-ShowVerticalScrollBar="true" Width="100%" EnableCallBacks="true" OnCustomCallback="gvGridTab3_CustomCallback">
                                <Columns>
                                    <dx:GridViewDataTextColumn FieldName="S_BIANHAO" Caption="编号" Width="">
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataTextColumn FieldName="I_ZWYM" Caption="账务年月" Width="">
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataTextColumn FieldName="S_WENJIANM" Caption="文件名" Width="">
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataTextColumn FieldName="N_ZONGJINE" Caption="总金额" Width="" PropertiesTextEdit-DisplayFormatString="0.00">
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataTextColumn FieldName="I_ZONGBIS" Caption="总笔数" Width="">
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataTextColumn FieldName="D_RIQI" Caption="日期" Width="" PropertiesTextEdit-DisplayFormatString="yyyy-MM-dd">
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataTextColumn FieldName="D_DAORURQ" Caption="导入日期" Width="" PropertiesTextEdit-DisplayFormatString="yyyy-MM-dd">
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataTextColumn FieldName="N_DAOZHANGJE" Caption="到账金额" Width="" PropertiesTextEdit-DisplayFormatString="0.00">
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataTextColumn FieldName="I_DAOZHANGBS" Caption="到账笔数" Width="">
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataTextColumn FieldName="N_TUIPIANJE" Caption="退票金额" Width="" PropertiesTextEdit-DisplayFormatString="0.00">
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataTextColumn FieldName="I_TUIPIAOBS" Caption="退票笔数" Width="">
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataTextColumn FieldName="N_QITAJE" Caption="其他金额" Width="" PropertiesTextEdit-DisplayFormatString="0.00">
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataTextColumn FieldName="I_QITABS" Caption="其他笔数" Width="">
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataTextColumn FieldName="I_YINHANGLX" Caption="托收类型" Width="">
                                    </dx:GridViewDataTextColumn>
                                </Columns>
                                <Settings VerticalScrollBarMode="Visible" HorizontalScrollBarMode="Auto" VerticalScrollableHeight="500"/>
                                <SettingsPager Mode="EndlessPaging" PageSize="100"/>
                                <Settings ShowFooter="True"/>
                                <SettingsBehavior AllowFocusedRow="True"/>
                                <SettingsBehavior ProcessFocusedRowChangedOnServer="false"/>
                            </dx:ASPxGridView>
                        </div>

                    </dx:ContentControl>
                </ContentCollection>
            </dx:TabPage>
        </TabPages>
    </dx:ASPxPageControl>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</form>
</body>
</html>